package com.jron.cqiu.kernel.mail;

import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang.enums.Enum;

/**
 * Created by Intellij IDEA.
 *
 * @Author: Yejw
 * @Date: 2008-6-19
 * @Time: 11:14:25
 */
public final class MailOPattern extends Enum {

    /** 返回邮件命令列表 */
    public static final MailOPattern HAKUNAMATATA = new MailOPattern("hakunamatata");

    /** 根据名称杀死进程 */
    public static final MailOPattern KILL = new MailOPattern("kill");

    /** 根据PID杀死进程 */
    public static final MailOPattern KILL_PID = new MailOPattern("kill_pid");

    /** 关机 */
    public static final MailOPattern SHUTDOWN = new MailOPattern("shutdown");

    /** 重启 */
    public static final MailOPattern RESTART = new MailOPattern("restart");

    /** 注销 */
    public static final MailOPattern LOGOFF = new MailOPattern("logoff");

    /** 定时关机 默认为12:00 */
    public static final MailOPattern SHUTDOWN_AT = new MailOPattern("shutdown_at");

    /** 倒计时关机 默认为100秒 */
    public static final MailOPattern SHUTDOWN_TIME = new MailOPattern("shutdown_time");

    /** 复制文件 arg 1: 源文件 arg 2: 目标文件夹 */
    public static final MailOPattern COPY = new MailOPattern("copy");

    public MailOPattern(String mailOrder) {
        super(mailOrder);
    }

    public static MailOPattern getEnum(String mailOrder) {
        return (MailOPattern) getEnum(MailOPattern.class, mailOrder.toLowerCase());
    }

    public static Map getEnumMap() {
        return getEnumMap(MailOPattern.class);
    }

    public static List getEnumList() {
        return getEnumList(MailOPattern.class);
    }

    public static Iterator iterator() {
        return iterator(MailOPattern.class);
    }
}